<?php defined('SYSPATH') OR die('No direct access allowed.'); ?>
<?php echo $cabecalho; ?>
<?php echo $menu_esq; ?>
<div id="mainContent">
<h1>Editar Grupos</h1>
<div><?php echo $msg;?></div>
<p>
<?php echo form::open("role/salvar"); ?>
<table width="100%" border="1">
      <tr>
        <td>nome</td>
        <td>valor</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php foreach($roles as $role){?>
      <?php echo form::hidden('id[]', $role->id)?>
	  <tr>
        <td>Nome</td>
        <td><?php echo form::input("name[]", $role->name); ?></td>
      </tr>
      <tr>
        <td>Description</td>
        <td><?php echo form::textarea("description[]", $role->description); ?></td>
      </tr>
      <tr>
        <td>Actions</td>
        <td><?php 
        		echo form::dropdown(array('name' => 'actions[]', 'multiple' => 'multiple', 'size' => 15), $actions); 
        	?></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php }?>
      <tr>
        <td><?php echo form::submit('enviar', 'Editar')?>&nbsp;</td>
        <td><?php echo html::anchor('role/listar/', 'Voltar'); ?>&nbsp;</td>
      </tr>
    </table>
<?php echo form::close(); ?>
</p>
<!-- end #mainContent --></div>
<?php echo $rodape; ?>